import request from '@/utils/request'

export function getRankCategoryList(params) {
  return request({
    url: process.env.ADMIN_API + '/rankCategory/getList',
    method: 'post',
    data: params
  })
}

export function addRankCategory(params) {
  return request({
    url: process.env.ADMIN_API + '/rankCategory/add',
    method: 'post',
    data: params
  })
}

export function editRankCategory(params) {
  return request({
    url: process.env.ADMIN_API + '/rankCategory/edit',
    method: 'post',
    data: params
  })
}

export function deleteBatchRankCategory(params) {
  return request({
    url: process.env.ADMIN_API + '/rankCategory/deleteBatch',
    method: 'post',
    data: params
  })
}

export function getRankCategoryMenu(params) {
  return request({
    url: process.env.ADMIN_API + '/rankCategory/menu/list',
    method: 'get',
    data: params
  })
}

export function deleteBatchRankCategoryMenu(params) {
  return request({
    url: process.env.ADMIN_API + '/rankCategory/menu/delete',
    method: 'post',
    data: params
  })
}

export function updateRankCategorySort(params) {
  return request({
    url: process.env.ADMIN_API + '/rankCategory/menu/update/sort',
    method: 'post',
    data: params
  })
}

export function getRankCategoryDetail(params) {
  return request({
    url: process.env.ADMIN_API + '/rankCategory/detail',
    method: 'get',
    params
  })
}

export function updateRankCategoryMenu(params) {
  return request({
    url: process.env.ADMIN_API + '/rankCategory/menu/update',
    method: 'post',
    data: params
  })
}

export function saveRankCategoryMenu(params) {
  return request({
    url: process.env.ADMIN_API + '/rankCategory/menu/save',
    method: 'post',
    data: params
  })
}


